import re

class Radio_HU(object):
    uri = (
        'http://stream001.radio.hu:8080/mr2.mp3',
        'http://stream001.radio.hu:8080/mr1.mp3',
        'http://stream001.radio.hu:8080/mr3.mp3',
        )
    
    def __call__(self, title):
        '''
        Receives the window title as provided by RB and
        returns the proper author, song tuple 
          or None if no match
        
        >>> string = 'My Artist - My song (My Radio)'
        >>> Radio_HU(string)
        ('My Artist', 'My song') 
        '''
        r = re.compile('(.*[^-])\s-\s(.*)(\s\().*')
        result = r.findall(title)
        if not result or not len(result[0]) == 3:
            return
        
        return result[0][0], result[0][1]
            
    